import requests from "../utils/request";

import qs from "qs";

const header = {
  "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
};
// 主页左侧轮播图
export const reqGetLink = () =>
  requests({ url: "/Page/GetLink", method: "post" });

// 主页右侧通知通告 湖南
export function Obtain(data) {
  return requests({
    headers: header,
    url: "/DataApi/Data/Obtain",
    method: "POST",
    data: qs.stringify(data),
  });
}
// 主页课程中心 湖南 
export function getCourse(data) {
  return requests({
    headers: header,
    url: "/Page/home/course",
    method: "POST",
    data: qs.stringify(data),
  });
}
// 主页课程中心上方导航 湖南 
export function courseCategory(data) {
  return requests({
    headers: header,
    url: "/Page/CourseCategory",
    method: "POST",
    data: qs.stringify(data),
  });
}
// 主页个人中心 湖南
export function personalCenter() {
  return requests({
    url: "/Page/PersonalCenter",
    method: "GET",
  });
}
// 主页培训园地 湖南 
export function classList(data) {
  return requests({
    headers: header,
    url: "/Page/home/GetClassList",
    method: "POST",
    data: qs.stringify(data),
  });
}

// 主页底部外链接 湖南 
export function friendLinkList() {
  return requests({
    url: "/Page/FriendLinkList",
    method: "GET",
  });
}

// 主页右侧培训信息的列表
export function reqArticleList(data) {
  return requests({
    headers: header,
    url: "/Page/ArticleList",
    method: "POST",
    data: qs.stringify(data),
  });
}
//主页课程中心
export function reqCourseList(data) {
  return requests({
    headers: header,
    url: "/Page/CourseList",
    method: "POST",
    data: qs.stringify(data),
  });
}
// 主页的学习专栏
export function reqSpecialCourse(data) {
  return requests({
    headers: header,
    url: "/courseinfo/GetSpecialCourseChannelList",
    method: "POST",
    data: qs.stringify(data),
  });
}
// 主页班级园地
export function reqClassList(data) {
  return requests({
    headers: header,
    url: "/Page/GetClassList",
    method: "POST",
    data: qs.stringify(data),
  });
}
// 图书阅读
export function reqBookList(data) {
  return requests({
    headers: header,
    url: "/Page/BookList",
    method: "POST",
    data: qs.stringify(data),
  });
}
// 主页课程排行
export function reqCourseClickRank(data) {
  return requests({
    headers: header,
    url: "/Page/CourseClickRank",
    method: "POST",
    data: qs.stringify(data),
  });
}
// 学时排行
export function reqRankUserList(data) {
  return requests({
    headers: header,
    url: "/Page/RankUserList",
    method: "POST",
    data: qs.stringify(data),
  });
}
// 单位排行
export function RankGroupList(data) {
  return requests({
    headers: header,
    url: "/Page/RankGroupList",
    method: "POST",
    data: qs.stringify(data),
  });
}
//实时数据
export function reqLeftRealTimeData() {
  return requests({
    headers: header,
    url: "/Page/LeftRealTimeData",
    method: "POST",
  });
}

//文章详情数据
export function reqArticleContent(data) {
  return requests({
    headers: header,
    url: "/Page/ArticleContent",
    method: "POST",
    data: qs.stringify(data),
  });
}
// 意见反馈页面的列表数据
export function reqMessageList(data) {
  return requests({
    headers: header,
    url: "/Page/MessageList",
    method: "POST",
    data: qs.stringify(data),
  });
}
// 提交意见反馈
export function reqMessageAdd(data) {
  return requests({
    headers: header,
    url: "/Page/GetMessageAdd",
    method: "POST",
    data: qs.stringify(data),
  });
}

// 意见反馈详情
export function reqMessageDetail(data) {
  return requests({
    headers: header,
    url: "/Page/MessageDetail",
    method: "POST",
    data: qs.stringify(data),
  });
}
//  问卷调查列表
export function reqPollList(data) {
  return requests({
    headers: header,
    url: "/Page/PollList",
    method: "POST",
    data: qs.stringify(data),
  });
}
// 问卷调查题目
export function reqPoll2(data) {
  return requests({
    headers: header,
    url: "/Exam/Poll2",
    method: "POST",
    data: qs.stringify(data),
  });
}
//提交问卷调查 /Exam/
export function reqPostPoll(data) {
  return requests({
    headers: header,
    url: "/Exam/PostPoll",
    method: "POST",
    data: qs.stringify(data),
  });
}
// 收藏
export function FavoriteAdd(data) {
  return requests({
    headers: header,
    url: "/Page/FavoriteAdd",
    method: "POST",
    data: qs.stringify(data),
  });
}
// 轮播图
export function linkList(data) {
  return requests({
    // headers: header,
    url: "/Page/GetLink",
    method: "POST",
    data: qs.stringify(data),
  });
}
// 单点
export function ssoLoginOut() {
  return requests({
    headers: header,
    url: "/Page/ssoLoginOut",
    method: "POST",
  });
}
//外链接
// export function Blogroll() {
//   return requests({
//     headers: header,
//     url: "/Page/Blogroll",
//     method: "POST",
//   });
// }
